"Or" eval_ Statements?

Hi,
Is there any way to "Or" two "eval_" statements? for example, I want to put two "eval" statements together, so that I can filter out the "in" and "out" suspect links, but I want them together. (i.e, I want to do something like:

eval_("#include <C:\\Program Files (x86)\\IBM\\Rational\\DOORS\\9.3\\lib\\dxl\\standard\\suspect\\filter\\filter_in_open>") || eval_("#include <C:\\Program Files (x86)\\IBM\\Rational\\DOORS\\9.3\\lib\\dxl\\standard\\suspect\\filter\\filter_out_open>")

 


Does a code like this exist?
Thanks!

 


josiah820 - Tue Jun 12 14:19:11 EDT 2012

Re: "Or" eval_ Statements?
Mathias Mamsch - Wed Jun 13 04:28:31 EDT 2012

Well the first question would be if you really need eval_ statements. I suspect each include file will set its own filter, so what you would need to do, is include each include file, get the current Filter, then OR these filters and then set the combined filter. Maybe something like this:
 

Filter g_filter_1 = null, g_filter_2 = null 
 
// we use brackets so we separate the namespaces of the include files, in case they define the same variables
{
  #include <... my filter file 1 ... >
  g_filter_1 = current
}
 
// we use brackets so we separate the namespaces of the include files, in case they define the same variables
{
  #include <... my filter file 2 ... >
  g_filter_2 = current
}
 
Filter result = g_filter_1 || g_filter_2 
set result
filtering on

 


Note that this will work only if the include files use real filters and not do 'accept' / 'reject'. Maybe that helps, regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: "Or" eval_ Statements?
josiah820 - Wed Jun 13 08:56:57 EDT 2012

Mathias Mamsch - Wed Jun 13 04:28:31 EDT 2012

Well the first question would be if you really need eval_ statements. I suspect each include file will set its own filter, so what you would need to do, is include each include file, get the current Filter, then OR these filters and then set the combined filter. Maybe something like this:
 

Filter g_filter_1 = null, g_filter_2 = null 
 
// we use brackets so we separate the namespaces of the include files, in case they define the same variables
{
  #include <... my filter file 1 ... >
  g_filter_1 = current
}
 
// we use brackets so we separate the namespaces of the include files, in case they define the same variables
{
  #include <... my filter file 2 ... >
  g_filter_2 = current
}
 
Filter result = g_filter_1 || g_filter_2 
set result
filtering on

 


Note that this will work only if the include files use real filters and not do 'accept' / 'reject'. Maybe that helps, regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

I tried that code, but it didn't work. Every time I declared a filter to be "current," it put another filter that I had created into the new filter. I'm not sure what to do about this?
Thanks